package com.foreknow.eldclient.controller;

import com.foreknow.eldclient.po.OrderDetailet;
import com.foreknow.eldclient.service.OrderDetailetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@ResponseBody
@RestController
@RequestMapping("OrderDetailetController")
public class OrderDetailetController {
    @Autowired
    OrderDetailetService ODS;
    @RequestMapping("/saveOrderDetailetBatch")
    public int saveOrderDetailetBatch(OrderDetailet orderDetailet) throws Exception {
        return ODS.saveOrderDetailetBatch(orderDetailet);
    }
    @RequestMapping("/listOrderDetailetByOrderId")
    public List<OrderDetailet> listOrderDetailetByOrderId(Integer orderId) throws Exception {
        return ODS.listOrderDetailetByOrderId(orderId);
    }

}
